<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8"/>
<head th:include="include :: header"></head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li>
								参加会议姓名：<input type="text" name="userName"/>
							</li>

							<li>
								手机号：<input type="text" name="phone"/>
							</li>
							<li>
								队名|组名：<input type="text" name="teamName"/>
							</li>
							<li>
								<!--<input type="text" name="statusRoleId"/>-->
								学习角色：<select name="statusRoleId" th:with="type=${@dict.getType('role_type')}">
								<option value="">所有</option>
								<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
							</select>
							</li>

							<!--<li>-->
								<!--队呼号：<input type="text" name="teamCall"/>-->
							<!--</li>-->

							<!--<li>-->
								<!--加分：<input type="text" name="bonusPoints"/>-->
							<!--</li>-->

							<!--<li>-->
								<!--减分：<input type="text" name="points"/>-->
							<!--</li>-->

							<!--<li>-->
								<!--创建时间：<input type="text" name="createTime"/>-->
							<!--</li>-->

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
	        <div class="btn-group-sm" id="toolbar" role="group">
				<!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:meetingSystem:add">-->
					<!--<i class="fa fa-plus"></i> 添加-->
				<a class="btn btn-success " onclick="$.operate.aa()" shiro:hasPermission="system:meetingSystem:all" >
					<i class="fa fa-plus"></i> 加减分数
				</a>
				<a class="btn btn-primary btn-edit disabled" onclick="$.operate.edit()" shiro:hasPermission="system:meetingSystem:edit">
					<i class="fa fa-edit"></i> 修改
				</a>
				<a class="btn btn-danger btn-del btn-del disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:meetingSystem:remove">
					<i class="fa fa-remove"></i> 删除
				</a>
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:meetingSystem:export">
						<i class="fa fa-download"></i> 导出
				 </a>

				<a class="btn btn-warning" onclick="quanshan()" >
					<i class="fa fa-remove"></i> 培训结束清空数据
				</a>
			</div>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:meetingSystem:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:meetingSystem:remove')}]];
        var prefix = ctx + "system/meetingSystem";

         function quanshan(){
             location.href=  prefix+"/quanshan"

		 }



        $(function() {
            var options = {
                url: prefix + "/list",
              //  createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
				allUrl:prefix+"/toAll",
                modalName: "参加会议用户",
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'msId', 
					title : '主键',
					visible: false
				},
				{
					field : 'num',
					title : '编号',
					sortable: true
				},
				{
					field : 'userName', 
					title : '参加会议姓名',
					sortable: true
				},
				{
					field : 'phone', 
					title : '手机号',
					sortable: true
				},
				{
					field : 'teamName', 
					title : '队名，组名',
					sortable: true
				},
				{
					field : 'statusRoleId', 
					title : '学习角色',
					sortable: true,
					formatter: function(value, item, index) {
						if (item.statusRoleId == '1') {
							return '<span class="label label-success">队长</span>';
						}
						else if (item.statusRoleId == '2') {
							return '<span class="label label-primary">队员</span>';
						}
						else if (item.statusRoleId == '3') {
							return '<span class="label label-warning">委员</span>';
						}
					}
				},
				{
					field : 'teamCall', 
					title : '队呼号',
					sortable: true
				},
				{
					field : 'bonusPoints', 
					title : '加分',
					sortable: true
				},
				{
					field : 'points', 
					title : '减分',
					sortable: true
				},
				{
					field : 'totalCount',
					title : '总积分',
					sortable: true
				},
				{
					field : 'createTime', 
					title : '创建时间',
					sortable: true
				},
                    {
                        field : 'companyName',
                        title : '公司名称',
                        sortable: true
                    },
                    {
                        field : 'companyPost',
                        title : '所属职位',
                        sortable: true
                    },
		        {
		            title: '操作',
		            align: 'center',
		            formatter: function(value, row, index) {
		            	var actions = [];
		            	actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.msId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.msId + '\')"><i class="fa fa-remove"></i>删除</a>');
						return actions.join('');
		            }
		        }]
            };
            $.table.init(options);
        });
                 /** 全部删除*/


    </script>
</body>
</html>